package Thread;

import jdk.nashorn.internal.objects.annotations.Getter;

/**
 * @author VX5
 * @Title: MJC
 * @ProjectName DataStructure
 * @Description: TODO
 * @date ${DAT}23:03
 */
public enum CountryEnum {
    ONE(1,"齐"),TWO(2,"楚"),THREE(3,"燕"),FOUR(4,"赵"),FIVE(5,"魏"),SIX(6,"韩");

    private Integer retCode;
    private String retMessage;

    CountryEnum(Integer retCode, String retMessage) {
        this.retCode = retCode;
        this.retMessage = retMessage;
    }

    public Integer getRetCode() {
        return retCode;
    }

    public String getRetMessage() {
        return retMessage;
    }

    public static CountryEnum forsearch(int index){
        CountryEnum[] enums = CountryEnum.values();
        for (CountryEnum anEnum : enums) {
            if (anEnum.getRetCode() == index){
                return anEnum;
            }
        }
        return null;
    }
}
